import getopt
import sys, os
from wsgiref.simple_server import make_server

from my_app import my_application as my_app


def test_server(ip='0.0.0.0', port=9666):
    httpd = make_server(ip, port, my_app.my_application)
    # httpd = make_server(ip, port, my_app.my_test_app)
    sa = httpd.socket.getsockname()
    print('http://{0}:{1}/'.format(*sa))
    httpd.serve_forever()


def main():

    test_server()


if __name__ == '__main__':
    main()






